                <div id="main">
                    <div id="c1" class="main_containers" style="width: 230px;">
                        <div id="m500" class="module" style="display: block;">
                            <div class="moduleFrame">
                                <div class="moduleHeader">
                                    <span class="moduleIcon"><img src="<?php echo JS_PATH;?>/phuongmaiadv/g/icon.gif" alt="icon"/></span>
                                    <div class="moduleTitle"></div>
                                </div>
                                <div class="moduleContent">
<?php
$currentPage = $this->currentPageID;
//$currentPageID = $this->currentPage;

if ($currentPage > 0) {
    // get all category has assigned from indexAction.
    $allCategory = $this->allCategory;

    // get current node
    //$leftMenu = $allCategory[$currentPage];
    $allParent = explode(',',$allCategory[$currentPage]['all_parent']);
    $allParent = is_array($allParent)?$allParent:array();
    $allParent[] = $this->currentPageID;
    
    //print_r($allParent);

    if (count($allCategory) > 0) {




          $str = "<ul id='navmenu'>";
		  $currenLevel = 1;
		  $first = true;
		  foreach ($allCategory as $row) {
		            if (($row['level'] > 0) && ($row['status'] == 1)) {
		       if ($row['level'] <= $currenLevel && !$first) { // exit child
		        $str .= "</li>\r\n";
		       }
		       if ($row['level'] < $currenLevel && !$first) { // exit child
		        for ($x = 0; $x < $currenLevel - $row['level']; $x++) {
		         $str .= "</ul></li>\r\n";
		        }
		       }
		       if ($row['level'] > $currenLevel) { // has child
		        $str .= "  <ul>\r\n";
		       }

               if(in_array($row['category_id'], $allParent)) {
                    $str .= "<li class='active'><a href='" . BASE_PATH . '/' . CURR_APP ."?pid={$row['category_id']}'>" . $row['admin_title'] . "</a>\r\n";
               } else {
                    $str .= "<li><a href='" . BASE_PATH . '/' . CURR_APP ."?pid={$row['category_id']}'>" . $row['admin_title'] . "</a>\r\n";
               }
		       $currenLevel = $row['level'];
		       $first = false;
		            }
		  } // for

		  if (!$first) {
		   $str .= "</li>";
		   for ($x = 1; $x < $currenLevel; $x++) {
		    $str .= "</ul></li>\r\n";
		   }
		  }
		  $str .= "</ul>";
        echo $str;
    } // count left children
?>

<?php } // if currentPage?>

                                </div>
                            </div>
                        </div>
                    </div>
                </div>
                <div id="main">                    <div id="c1" class="main_containers" style="width: 230px;">                        <div id="m500" class="module" style="display: block;">                            <div class="moduleFrame">                                <div class="moduleHeader">                                    <span class="moduleIcon"><img src="<?php echo JS_PATH;?>/phuongmaiadv/g/icon.gif" alt="icon"/></span>                                    <div class="moduleTitle">Contact Us</div>                                </div>                                <div class="moduleContent" style="text-align:center;">15 Truong Son Street  Ward 4<br>Tan Binh District<br>Ho Chi Minh City<br>VIETNAM<br>Phone: +84 8 3948 0652<br>Phone: +84 8 3948 0361<br>Fax: +84 8 3948 0653<br>Mobile: +84 908 200 690<br>Email: nghian@ndtco.net<br><br>Australian Partner Company<br><br><img width="120" height="78" border="0" src="http://ndtco.net/DGrootLOGO-small.jpg"/><br><br>                                </div>                            </div>                        </div>                    </div>                </div>        <link rel="stylesheet" href="<?php echo JS_PATH;?>/ndtco/menu/cssmenuhorizontal.css" type="text/css" />
<div style="clear:both;"></div>